package cn.starrysky108.simpleerp.user.entity;

import cn.starrysky108.simpleerp.core.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author Carl Lee
 * @since 2021-08-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("user")
@ApiModel(value = "User对象", description = "用户信息表")
public class User extends BaseEntity {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "真实姓名")
    @TableField("actual_name")
    private String actualName;

    @ApiModelProperty(value = "电话号码")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "邮箱地址")
    @TableField("email")
    private String email;

    @ApiModelProperty(value = "住址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "户主")
    @TableField("household")
    private Long household;

    @ApiModelProperty(value = "头像")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty(value = "部门id")
    @TableField("department_id")
    private Long departmentId;

    @ApiModelProperty(value = "上一次登录时间")
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;


    @ApiModelProperty(value = "是否没有过期，默认true")
    @TableField("account_non_expired")
    private Boolean accountNonExpired;

    @ApiModelProperty(value = "是否没有被锁定，默认true")
    @TableField("account_non_locked")
    private Boolean accountNonLocked;

    @ApiModelProperty(value = "密码是否没有过期，默认true")
    @TableField("credentials_non_expired")
    private Boolean credentialsNonExpired;

    @ApiModelProperty(value = "账户是否启用，默认true")
    @TableField("enabled")
    private Boolean enabled;


}
